Good
O(n)
.Bad
K
value.Step 1: Choose the number K of neighbors
Step 2: Take the K nearest neighbors of the new data point, according to the Euclidean distance
Euclidean Distance = √(x2 - x1)2 + (y2 - y1)2
Step 3: Among these K neighbors, count the number of data points in each category
Step 4: Assign the new data point to the category where you counted the most neighbors
Your Model is Ready
«Previous | Next» |